Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the Docker image "rootless" [WIP] #799

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Make the Docker image "rootless" [WIP] #799

wants to merge 1 commit into from

Conversation

toch
Copy link
Contributor

@toch toch commented Aug 23, 2024

The previous image set root as the default user. This means that a process has the root rights and can create files with this id in a mounted volume from the host. This is a common attack vector.

Changes

With the present change, the container will run under a normal user openhexa without any root permission.

Noticed that doesn't make Docker rootless. This requires to prepare the Docker engine to run in a normal userspace. This goes beyond the present change.

How/what to test

run the whole app and test it

@toch toch marked this pull request as draft August 23, 2024 14:23
@toch toch force-pushed the rootless-image branch 3 times, most recently from 5ce2e13 to 185d350 Compare September 27, 2024 08:28
@toch toch force-pushed the rootless-image branch 5 times, most recently from 108a9ff to 387838b Compare November 8, 2024 10:02
The previous image set root as the default user. This means that a process
has the root rights and can create files with this id in a mounted volume from
the host. This is a common attack vector.

With the present change, the container will run under a normal user `openhexa`
without any root permission.

It's also possible to set the UID and GID of the containerized process and
session. The pipeline runner requires the GID that corresponds to the host
Docker group.

Noticed that doesn't make Docker rootless. This requires to prepare the Docker
engine to run in a normal userspace. This goes beyond the present change.
@toch toch marked this pull request as ready for review November 8, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant